<?php require_once('Connections/hitekforyou.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_hitekforyou, $hitekforyou);
$query_HangSX = "SELECT idHang, TenHang FROM hangsx ORDER BY idHang ASC";
$HangSX = mysql_query($query_HangSX, $hitekforyou) or die(mysql_error());
$row_HangSX = mysql_fetch_assoc($HangSX);
$totalRows_HangSX = mysql_num_rows($HangSX);

mysql_select_db($database_hitekforyou, $hitekforyou);
$query_TVOnline = "SELECT * FROM tuvanonline ORDER BY idTVO DESC LIMIT 1";
$TVOnline = mysql_query($query_TVOnline, $hitekforyou) or die(mysql_error());
$row_TVOnline = mysql_fetch_assoc($TVOnline);
$totalRows_TVOnline = mysql_num_rows($TVOnline);
?><div id="leftmain">
    <!-- Start Table Thương hiệu -->
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td><img src="images/thuong-hieu.jpg" width="188" height="37" /></td>
          </tr>
          <tr>
            <td align="center" background="images/bl-bg.gif" style="padding-left:12px; padding-right:12px;">
              <?php do { ?>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                      <tr>
                        <td><a href="loaiSP.php?idHang=<?php echo $row_HangSX['idHang']; ?>" class="brand"><?php echo $row_HangSX['TenHang']; ?></a></td>
                      </tr> 
                    </tbody>
                    <div style="height:4px;"><img src="images/spacer.gif" /></div>
                  </table>     
                  
                  <?php } while ($row_HangSX = mysql_fetch_assoc($HangSX)); ?>  
   </td>
          </tr>
          <tr>
            <td><img src="images/bl-u.gif" width="188" height="12" /></td>
          </tr>
        </tbody>
      </table> <!-- End Table Thương hiệu -->
      
      <p align="center"><a href="ymsgr:sendim?<?php echo $row_TVOnline['NickYH']; ?>&amp;m=Hello"><img src="images/online.gif?u=<?php echo $row_TVOnline['NickYH']; ?>&amp;m=g&amp;t=11=us" alt="Nhắp vào đây để liên hệ với admin" width="185" border="0" /></a></p>
      <!-- Start Flash quang cao -->
      <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','185','height','225','src','flash/samsung_galaxyY_210x480','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/samsung_galaxyY_210x480' ); //end AC code
        </script>
        <noscript>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="185" height="225">
          <param name="movie" value="flash/samsung_galaxyY_210x480.swf" />
          <param name="quality" value="high" />
          
          <embed src="flash/samsung_galaxyY_210x480.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="185" height="225"></embed>
        </object>
        </noscript>
      <!-- End Flash quang cao -->
      
    </div>
<?php
mysql_free_result($HangSX);

mysql_free_result($TVOnline);
?>
